const fs = require('fs');
const path = require('path');
file = fs.readFileSync('./test/1.txt', 'utf8');

// 文件读取
function ReadFile(way) {
  return new Promise((resolve, reject) => {
    fs.readFile(way, 'utf8', (err, res) => {
      if (err) {
        reject(err);
      } else {
        resolve(res);
      }
    });
  });
}

module.exports = {
  file,
  ReadFile,
};
